<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::MaximumLikelihoodSampleConsensus&lt; PointT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1_maximum_likelihood_sample_consensus.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pri-types">Private 类型</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="classpcl_1_1_maximum_likelihood_sample_consensus-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::MaximumLikelihoodSampleConsensus&lt; PointT &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><b><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html" title="MaximumLikelihoodSampleConsensus represents an implementation of the MLESAC (Maximum Likelihood Estim...">MaximumLikelihoodSampleConsensus</a></b> represents an implementation of the MLESAC (Maximum Likelihood Estimator SAmple Consensus) algorithm, as described in: "MLESAC: A new robust estimator with application to 
estimating image geometry", P.H.S. Torr and A. Zisserman, Computer Vision and Image Understanding, vol 78, 2000.  
 <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="mlesac_8h_source.html">mlesac.h</a>&gt;</code></p>
<div class="dynheader">
类 pcl::MaximumLikelihoodSampleConsensus&lt; PointT &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1_maximum_likelihood_sample_consensus.png" usemap="#pcl::MaximumLikelihoodSampleConsensus_3C_20PointT_20_3E_map" alt=""/>
  <map id="pcl::MaximumLikelihoodSampleConsensus_3C_20PointT_20_3E_map" name="pcl::MaximumLikelihoodSampleConsensus_3C_20PointT_20_3E_map">
<area href="classpcl_1_1_sample_consensus.html" alt="pcl::SampleConsensus&lt; PointT &gt;" shape="rect" coords="0,0,306,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:abaa29de27951d2d3fa875be5d1b3c428"><td class="memItemLeft" align="right" valign="top"><a id="abaa29de27951d2d3fa875be5d1b3c428"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">MaximumLikelihoodSampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:abaa29de27951d2d3fa875be5d1b3c428"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5613219c2f38a0a9f11f18104903d9bc"><td class="memItemLeft" align="right" valign="top"><a id="a5613219c2f38a0a9f11f18104903d9bc"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">MaximumLikelihoodSampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:a5613219c2f38a0a9f11f18104903d9bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; PointT &gt;</a></td></tr>
<tr class="memitem:aaf12b77bbf0507ff0c7e28e4844d894f inherit pub_types_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aaf12b77bbf0507ff0c7e28e4844d894f"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:aaf12b77bbf0507ff0c7e28e4844d894f inherit pub_types_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abfd144d2c057d7b997877d5cce90c5a5 inherit pub_types_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="abfd144d2c057d7b997877d5cce90c5a5"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1_sample_consensus.html">SampleConsensus</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:abfd144d2c057d7b997877d5cce90c5a5 inherit pub_types_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a091079115559419801ac9a4c967f628c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a091079115559419801ac9a4c967f628c">MaximumLikelihoodSampleConsensus</a> (const SampleConsensusModelPtr &amp;model)</td></tr>
<tr class="memdesc:a091079115559419801ac9a4c967f628c"><td class="mdescLeft">&#160;</td><td class="mdescRight">MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor  <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a091079115559419801ac9a4c967f628c">更多...</a><br /></td></tr>
<tr class="separator:a091079115559419801ac9a4c967f628c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11701ef0a5e49688284bb6d99795b4aa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a11701ef0a5e49688284bb6d99795b4aa">MaximumLikelihoodSampleConsensus</a> (const SampleConsensusModelPtr &amp;model, double threshold)</td></tr>
<tr class="memdesc:a11701ef0a5e49688284bb6d99795b4aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor  <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a11701ef0a5e49688284bb6d99795b4aa">更多...</a><br /></td></tr>
<tr class="separator:a11701ef0a5e49688284bb6d99795b4aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a860128eaca61e128e78f39c7d51972b1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a860128eaca61e128e78f39c7d51972b1">computeModel</a> (int debug_verbosity_level=0)</td></tr>
<tr class="memdesc:a860128eaca61e128e78f39c7d51972b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the actual model and find the inliers  <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a860128eaca61e128e78f39c7d51972b1">更多...</a><br /></td></tr>
<tr class="separator:a860128eaca61e128e78f39c7d51972b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34ea1f0393f8487a30213a1b8ad76322"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a34ea1f0393f8487a30213a1b8ad76322">setEMIterations</a> (int iterations)</td></tr>
<tr class="memdesc:a34ea1f0393f8487a30213a1b8ad76322"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the number of EM iterations.  <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a34ea1f0393f8487a30213a1b8ad76322">更多...</a><br /></td></tr>
<tr class="separator:a34ea1f0393f8487a30213a1b8ad76322"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12371e17dc5df8efab55c56a8ce03b69"><td class="memItemLeft" align="right" valign="top"><a id="a12371e17dc5df8efab55c56a8ce03b69"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a12371e17dc5df8efab55c56a8ce03b69">getEMIterations</a> () const</td></tr>
<tr class="memdesc:a12371e17dc5df8efab55c56a8ce03b69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of EM iterations. <br /></td></tr>
<tr class="separator:a12371e17dc5df8efab55c56a8ce03b69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; PointT &gt;</a></td></tr>
<tr class="memitem:aee8d85e0b1062f5e18d43609e6ac59bf inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aee8d85e0b1062f5e18d43609e6ac59bf">SampleConsensus</a> (const SampleConsensusModelPtr &amp;model, bool random=false)</td></tr>
<tr class="memdesc:aee8d85e0b1062f5e18d43609e6ac59bf inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for base SAC.  <a href="classpcl_1_1_sample_consensus.html#aee8d85e0b1062f5e18d43609e6ac59bf">更多...</a><br /></td></tr>
<tr class="separator:aee8d85e0b1062f5e18d43609e6ac59bf inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4937e9bc2a8acf15ae97c7d763090a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aac4937e9bc2a8acf15ae97c7d763090a">SampleConsensus</a> (const SampleConsensusModelPtr &amp;model, double threshold, bool random=false)</td></tr>
<tr class="memdesc:aac4937e9bc2a8acf15ae97c7d763090a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for base SAC.  <a href="classpcl_1_1_sample_consensus.html#aac4937e9bc2a8acf15ae97c7d763090a">更多...</a><br /></td></tr>
<tr class="separator:aac4937e9bc2a8acf15ae97c7d763090a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca6f09bf3c664bfed2ae36e81909e9f2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aca6f09bf3c664bfed2ae36e81909e9f2">setSampleConsensusModel</a> (const SampleConsensusModelPtr &amp;model)</td></tr>
<tr class="memdesc:aca6f09bf3c664bfed2ae36e81909e9f2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Sample Consensus model to use.  <a href="classpcl_1_1_sample_consensus.html#aca6f09bf3c664bfed2ae36e81909e9f2">更多...</a><br /></td></tr>
<tr class="separator:aca6f09bf3c664bfed2ae36e81909e9f2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a101dfdcc9098f463db135a7655a438 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a1a101dfdcc9098f463db135a7655a438"></a>
SampleConsensusModelPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a1a101dfdcc9098f463db135a7655a438">getSampleConsensusModel</a> () const</td></tr>
<tr class="memdesc:a1a101dfdcc9098f463db135a7655a438 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the Sample Consensus model used. <br /></td></tr>
<tr class="separator:a1a101dfdcc9098f463db135a7655a438 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a138ae225b2d724491a7abdfcfd2b4de5 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a138ae225b2d724491a7abdfcfd2b4de5"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a138ae225b2d724491a7abdfcfd2b4de5">~SampleConsensus</a> ()</td></tr>
<tr class="memdesc:a138ae225b2d724491a7abdfcfd2b4de5 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor for base SAC. <br /></td></tr>
<tr class="separator:a138ae225b2d724491a7abdfcfd2b4de5 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1a06ccc992dfc9e65e70f5876f3c8d3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ae1a06ccc992dfc9e65e70f5876f3c8d3">setDistanceThreshold</a> (double threshold)</td></tr>
<tr class="memdesc:ae1a06ccc992dfc9e65e70f5876f3c8d3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the distance to model threshold.  <a href="classpcl_1_1_sample_consensus.html#ae1a06ccc992dfc9e65e70f5876f3c8d3">更多...</a><br /></td></tr>
<tr class="separator:ae1a06ccc992dfc9e65e70f5876f3c8d3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a575ab4a3facfdc8e007f427a96798d7d inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a575ab4a3facfdc8e007f427a96798d7d"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a575ab4a3facfdc8e007f427a96798d7d">getDistanceThreshold</a> ()</td></tr>
<tr class="memdesc:a575ab4a3facfdc8e007f427a96798d7d inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the distance to model threshold, as set by the user. <br /></td></tr>
<tr class="separator:a575ab4a3facfdc8e007f427a96798d7d inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8558bc2462b6da4a2f88b2efc1ad571 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#af8558bc2462b6da4a2f88b2efc1ad571">setMaxIterations</a> (int max_iterations)</td></tr>
<tr class="memdesc:af8558bc2462b6da4a2f88b2efc1ad571 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the maximum number of iterations.  <a href="classpcl_1_1_sample_consensus.html#af8558bc2462b6da4a2f88b2efc1ad571">更多...</a><br /></td></tr>
<tr class="separator:af8558bc2462b6da4a2f88b2efc1ad571 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5c7f23a52dc184d8cc56790d63d375a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa5c7f23a52dc184d8cc56790d63d375a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa5c7f23a52dc184d8cc56790d63d375a">getMaxIterations</a> ()</td></tr>
<tr class="memdesc:aa5c7f23a52dc184d8cc56790d63d375a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum number of iterations, as set by the user. <br /></td></tr>
<tr class="separator:aa5c7f23a52dc184d8cc56790d63d375a inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd6b8031622746d8b6aada91ffbaa7ee inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#acd6b8031622746d8b6aada91ffbaa7ee">setProbability</a> (double probability)</td></tr>
<tr class="memdesc:acd6b8031622746d8b6aada91ffbaa7ee inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the desired probability of choosing at least one sample free from outliers.  <a href="classpcl_1_1_sample_consensus.html#acd6b8031622746d8b6aada91ffbaa7ee">更多...</a><br /></td></tr>
<tr class="separator:acd6b8031622746d8b6aada91ffbaa7ee inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afafb66faf0cbfa464cd884127bafdac3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="afafb66faf0cbfa464cd884127bafdac3"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#afafb66faf0cbfa464cd884127bafdac3">getProbability</a> ()</td></tr>
<tr class="memdesc:afafb66faf0cbfa464cd884127bafdac3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain the probability of choosing at least one sample free from outliers, as set by the user. <br /></td></tr>
<tr class="separator:afafb66faf0cbfa464cd884127bafdac3 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7c059e9ee5b5180bb7fb02b0d947c36 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#af7c059e9ee5b5180bb7fb02b0d947c36">refineModel</a> (const double sigma=3.0, const unsigned int max_iterations=1000)</td></tr>
<tr class="memdesc:af7c059e9ee5b5180bb7fb02b0d947c36 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Refine the model found. This loops over the model coefficients and optimizes them together with the set of inliers, until the change in the set of inliers is minimal.  <a href="classpcl_1_1_sample_consensus.html#af7c059e9ee5b5180bb7fb02b0d947c36">更多...</a><br /></td></tr>
<tr class="separator:af7c059e9ee5b5180bb7fb02b0d947c36 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56b0649ebe9cd4b8a48442f864f5e83c inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a56b0649ebe9cd4b8a48442f864f5e83c">getRandomSamples</a> (const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, size_t nr_samples, std::set&lt; int &gt; &amp;indices_subset)</td></tr>
<tr class="memdesc:a56b0649ebe9cd4b8a48442f864f5e83c inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a set of randomly selected indices.  <a href="classpcl_1_1_sample_consensus.html#a56b0649ebe9cd4b8a48442f864f5e83c">更多...</a><br /></td></tr>
<tr class="separator:a56b0649ebe9cd4b8a48442f864f5e83c inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae09f01cda7605910955b0aee847ea849 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ae09f01cda7605910955b0aee847ea849">getModel</a> (std::vector&lt; int &gt; &amp;model)</td></tr>
<tr class="memdesc:ae09f01cda7605910955b0aee847ea849 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the best model found so far.  <a href="classpcl_1_1_sample_consensus.html#ae09f01cda7605910955b0aee847ea849">更多...</a><br /></td></tr>
<tr class="separator:ae09f01cda7605910955b0aee847ea849 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ac2013afb3a2feaaeb661f3aa3ccf6b inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a7ac2013afb3a2feaaeb661f3aa3ccf6b">getInliers</a> (std::vector&lt; int &gt; &amp;inliers)</td></tr>
<tr class="memdesc:a7ac2013afb3a2feaaeb661f3aa3ccf6b inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the best set of inliers found so far for this model.  <a href="classpcl_1_1_sample_consensus.html#a7ac2013afb3a2feaaeb661f3aa3ccf6b">更多...</a><br /></td></tr>
<tr class="separator:a7ac2013afb3a2feaaeb661f3aa3ccf6b inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f55f89ee72539f66f7edc8bcf6ce0c2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a9f55f89ee72539f66f7edc8bcf6ce0c2">getModelCoefficients</a> (Eigen::VectorXf &amp;model_coefficients)</td></tr>
<tr class="memdesc:a9f55f89ee72539f66f7edc8bcf6ce0c2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the model coefficients of the best model found so far.  <a href="classpcl_1_1_sample_consensus.html#a9f55f89ee72539f66f7edc8bcf6ce0c2">更多...</a><br /></td></tr>
<tr class="separator:a9f55f89ee72539f66f7edc8bcf6ce0c2 inherit pub_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a9bb56a33f198ee587d29ad638c8dc6a2"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a9bb56a33f198ee587d29ad638c8dc6a2">computeMedianAbsoluteDeviation</a> (const PointCloudConstPtr &amp;cloud, const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, double sigma)</td></tr>
<tr class="memdesc:a9bb56a33f198ee587d29ad638c8dc6a2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the median absolute deviation:  <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a9bb56a33f198ee587d29ad638c8dc6a2">更多...</a><br /></td></tr>
<tr class="separator:a9bb56a33f198ee587d29ad638c8dc6a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae91b05dd012acbb76475fc6df5d0ab3b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#ae91b05dd012acbb76475fc6df5d0ab3b">getMinMax</a> (const PointCloudConstPtr &amp;cloud, const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, Eigen::Vector4f &amp;min_p, Eigen::Vector4f &amp;max_p)</td></tr>
<tr class="memdesc:ae91b05dd012acbb76475fc6df5d0ab3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine the minimum and maximum 3D bounding box coordinates for a given set of points  <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#ae91b05dd012acbb76475fc6df5d0ab3b">更多...</a><br /></td></tr>
<tr class="separator:ae91b05dd012acbb76475fc6df5d0ab3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8440dc560085d24f3f28e6735dc9a627"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a8440dc560085d24f3f28e6735dc9a627">computeMedian</a> (const PointCloudConstPtr &amp;cloud, const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, Eigen::Vector4f &amp;median)</td></tr>
<tr class="memdesc:a8440dc560085d24f3f28e6735dc9a627"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the median value of a 3D point cloud using a given set point indices and return it as a Point32.  <a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a8440dc560085d24f3f28e6735dc9a627">更多...</a><br /></td></tr>
<tr class="separator:a8440dc560085d24f3f28e6735dc9a627"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Protected 成员函数 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; PointT &gt;</a></td></tr>
<tr class="memitem:a7a731d68a379a0a6442deae93e85d3a8 inherit pro_methods_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a7a731d68a379a0a6442deae93e85d3a8"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a7a731d68a379a0a6442deae93e85d3a8">rnd</a> ()</td></tr>
<tr class="memdesc:a7a731d68a379a0a6442deae93e85d3a8 inherit pro_methods_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator. <br /></td></tr>
<tr class="separator:a7a731d68a379a0a6442deae93e85d3a8 inherit pro_methods_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private 类型</h2></td></tr>
<tr class="memitem:a619e94dbc73e64c87ab8720e85044965"><td class="memItemLeft" align="right" valign="top"><a id="a619e94dbc73e64c87ab8720e85044965"></a>
typedef <a class="el" href="classpcl_1_1_sample_consensus_model.html">SampleConsensusModel</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>SampleConsensusModelPtr</b></td></tr>
<tr class="separator:a619e94dbc73e64c87ab8720e85044965"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11bb2ffb388d0d02001e35dfc76d1e8c"><td class="memItemLeft" align="right" valign="top"><a id="a11bb2ffb388d0d02001e35dfc76d1e8c"></a>
typedef <a class="el" href="classpcl_1_1_sample_consensus_model.html">SampleConsensusModel</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::PointCloudConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudConstPtr</b></td></tr>
<tr class="separator:a11bb2ffb388d0d02001e35dfc76d1e8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a7b8670f94aa8cd5345fddfcfba6ec5fd"><td class="memItemLeft" align="right" valign="top"><a id="a7b8670f94aa8cd5345fddfcfba6ec5fd"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a7b8670f94aa8cd5345fddfcfba6ec5fd">iterations_EM_</a></td></tr>
<tr class="memdesc:a7b8670f94aa8cd5345fddfcfba6ec5fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of EM (Expectation Maximization) iterations. <br /></td></tr>
<tr class="separator:a7b8670f94aa8cd5345fddfcfba6ec5fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa59d111620bf247e8d08d9366eb72beb"><td class="memItemLeft" align="right" valign="top"><a id="aa59d111620bf247e8d08d9366eb72beb"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a></td></tr>
<tr class="memdesc:aa59d111620bf247e8d08d9366eb72beb"><td class="mdescLeft">&#160;</td><td class="mdescRight">The MLESAC sigma parameter. <br /></td></tr>
<tr class="separator:aa59d111620bf247e8d08d9366eb72beb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pro_attribs_classpcl_1_1_sample_consensus"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classpcl_1_1_sample_consensus')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="classpcl_1_1_sample_consensus.html">pcl::SampleConsensus&lt; PointT &gt;</a></td></tr>
<tr class="memitem:aa4953d080c1ab4223cde8ff8d8cabc52 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa4953d080c1ab4223cde8ff8d8cabc52"></a>
SampleConsensusModelPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a></td></tr>
<tr class="memdesc:aa4953d080c1ab4223cde8ff8d8cabc52 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The underlying data model used (i.e. what is it that we attempt to search for). <br /></td></tr>
<tr class="separator:aa4953d080c1ab4223cde8ff8d8cabc52 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e04da16522ae180cb8cc2e6ef0d2244 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a0e04da16522ae180cb8cc2e6ef0d2244"></a>
std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a></td></tr>
<tr class="memdesc:a0e04da16522ae180cb8cc2e6ef0d2244 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The model found after the last computeModel () as point cloud indices. <br /></td></tr>
<tr class="separator:a0e04da16522ae180cb8cc2e6ef0d2244 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0115926eadf78f7bc1ad4675659d8343 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a0115926eadf78f7bc1ad4675659d8343"></a>
std::vector&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a></td></tr>
<tr class="memdesc:a0115926eadf78f7bc1ad4675659d8343 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The indices of the points that were chosen as inliers after the last computeModel () call. <br /></td></tr>
<tr class="separator:a0115926eadf78f7bc1ad4675659d8343 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96f852dfca500689684313d3cb7f84b1 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a96f852dfca500689684313d3cb7f84b1"></a>
Eigen::VectorXf&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a></td></tr>
<tr class="memdesc:a96f852dfca500689684313d3cb7f84b1 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">The coefficients of our model computed directly from the model found. <br /></td></tr>
<tr class="separator:a96f852dfca500689684313d3cb7f84b1 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a025913cc2a2099a553fe7842aa792326 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a025913cc2a2099a553fe7842aa792326"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">probability_</a></td></tr>
<tr class="memdesc:a025913cc2a2099a553fe7842aa792326 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Desired probability of choosing at least one sample free from outliers. <br /></td></tr>
<tr class="separator:a025913cc2a2099a553fe7842aa792326 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a471e062f42e9cb4ae9d77107cc135acb inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a471e062f42e9cb4ae9d77107cc135acb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a></td></tr>
<tr class="memdesc:a471e062f42e9cb4ae9d77107cc135acb inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Total number of internal loop iterations that we've done so far. <br /></td></tr>
<tr class="separator:a471e062f42e9cb4ae9d77107cc135acb inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1c52d7d8be8f058feac1f9241bf305e inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa1c52d7d8be8f058feac1f9241bf305e"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a></td></tr>
<tr class="memdesc:aa1c52d7d8be8f058feac1f9241bf305e inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Distance to model threshold. <br /></td></tr>
<tr class="separator:aa1c52d7d8be8f058feac1f9241bf305e inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a></td></tr>
<tr class="memdesc:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum number of iterations before giving up. <br /></td></tr>
<tr class="separator:ab5ca8dbf21b2a1c6ed9c1e8d3eba853c inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3860965324830148970ba99223663aa2 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="a3860965324830148970ba99223663aa2"></a>
boost::mt19937&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#a3860965324830148970ba99223663aa2">rng_alg_</a></td></tr>
<tr class="memdesc:a3860965324830148970ba99223663aa2 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator algorithm. <br /></td></tr>
<tr class="separator:a3860965324830148970ba99223663aa2 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa23f804b4957312659adca2068e05682 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memItemLeft" align="right" valign="top"><a id="aa23f804b4957312659adca2068e05682"></a>
boost::shared_ptr&lt; boost::uniform_01&lt; boost::mt19937 &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1_sample_consensus.html#aa23f804b4957312659adca2068e05682">rng_</a></td></tr>
<tr class="memdesc:aa23f804b4957312659adca2068e05682 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="mdescLeft">&#160;</td><td class="mdescRight">Boost-based random number generator distribution. <br /></td></tr>
<tr class="separator:aa23f804b4957312659adca2068e05682 inherit pro_attribs_classpcl_1_1_sample_consensus"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT&gt;<br />
class pcl::MaximumLikelihoodSampleConsensus&lt; PointT &gt;</h3>

<p><b><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html" title="MaximumLikelihoodSampleConsensus represents an implementation of the MLESAC (Maximum Likelihood Estim...">MaximumLikelihoodSampleConsensus</a></b> represents an implementation of the MLESAC (Maximum Likelihood Estimator SAmple Consensus) algorithm, as described in: "MLESAC: A new robust estimator with application to 
estimating image geometry", P.H.S. Torr and A. Zisserman, Computer Vision and Image Understanding, vol 78, 2000. </p>
<dl class="section note"><dt>注解</dt><dd>MLESAC is useful in situations where most of the data samples belong to the model, and a fast outlier rejection algorithm is needed. </dd></dl>
<dl class="section author"><dt>作者</dt><dd>Radu B. Rusu </dd></dl>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a091079115559419801ac9a4c967f628c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a091079115559419801ac9a4c967f628c">&#9670;&nbsp;</a></span>MaximumLikelihoodSampleConsensus() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">pcl::MaximumLikelihoodSampleConsensus</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::<a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">MaximumLikelihoodSampleConsensus</a> </td>
          <td>(</td>
          <td class="paramtype">const SampleConsensusModelPtr &amp;&#160;</td>
          <td class="paramname"><em>model</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>a Sample Consensus model </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;                                                                              : </div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        SampleConsensus&lt;PointT&gt; (model),</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a7b8670f94aa8cd5345fddfcfba6ec5fd">iterations_EM_</a> (3),      <span class="comment">// Max number of EM (Expectation Maximization) iterations</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a> (0)</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      {</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> = 10000; <span class="comment">// Maximum number of trials before we give up.</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      }</div>
<div class="ttc" id="aclasspcl_1_1_maximum_likelihood_sample_consensus_html_a7b8670f94aa8cd5345fddfcfba6ec5fd"><div class="ttname"><a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a7b8670f94aa8cd5345fddfcfba6ec5fd">pcl::MaximumLikelihoodSampleConsensus::iterations_EM_</a></div><div class="ttdeci">int iterations_EM_</div><div class="ttdoc">Maximum number of EM (Expectation Maximization) iterations.</div><div class="ttdef"><b>Definition:</b> mlesac.h:154</div></div>
<div class="ttc" id="aclasspcl_1_1_maximum_likelihood_sample_consensus_html_aa59d111620bf247e8d08d9366eb72beb"><div class="ttname"><a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">pcl::MaximumLikelihoodSampleConsensus::sigma_</a></div><div class="ttdeci">double sigma_</div><div class="ttdoc">The MLESAC sigma parameter.</div><div class="ttdef"><b>Definition:</b> mlesac.h:156</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_ab5ca8dbf21b2a1c6ed9c1e8d3eba853c"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">pcl::SampleConsensus&lt; PointT &gt;::max_iterations_</a></div><div class="ttdeci">int max_iterations_</div><div class="ttdoc">Maximum number of iterations before giving up.</div><div class="ttdef"><b>Definition:</b> sac.h:331</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a11701ef0a5e49688284bb6d99795b4aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11701ef0a5e49688284bb6d99795b4aa">&#9670;&nbsp;</a></span>MaximumLikelihoodSampleConsensus() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">pcl::MaximumLikelihoodSampleConsensus</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::<a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">MaximumLikelihoodSampleConsensus</a> </td>
          <td>(</td>
          <td class="paramtype">const SampleConsensusModelPtr &amp;&#160;</td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>threshold</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>a Sample Consensus model </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>distance to model threshold </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                                                                                                : </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        SampleConsensus&lt;PointT&gt; (model, threshold),</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a7b8670f94aa8cd5345fddfcfba6ec5fd">iterations_EM_</a> (3),      <span class="comment">// Max number of EM (Expectation Maximization) iterations</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;        <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a> (0)</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;      {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> = 10000; <span class="comment">// Maximum number of trials before we give up.</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;      }</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a8440dc560085d24f3f28e6735dc9a627"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8440dc560085d24f3f28e6735dc9a627">&#9670;&nbsp;</a></span>computeMedian()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">pcl::MaximumLikelihoodSampleConsensus</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::computeMedian </td>
          <td>(</td>
          <td class="paramtype">const PointCloudConstPtr &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Eigen::Vector4f &amp;&#160;</td>
          <td class="paramname"><em>median</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the median value of a 3D point cloud using a given set point indices and return it as a Point32. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the point cloud data message </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">indices</td><td>the point indices </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">median</td><td>the resultant median value </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;{</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;  <span class="comment">// Copy the values to vectors for faster sorting</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;  std::vector&lt;float&gt; x (indices-&gt;size ());</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;  std::vector&lt;float&gt; y (indices-&gt;size ());</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;  std::vector&lt;float&gt; z (indices-&gt;size ());</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; indices-&gt;size (); ++i)</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  {</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    x[i] = cloud-&gt;points[(*indices)[i]].x;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    y[i] = cloud-&gt;points[(*indices)[i]].y;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    z[i] = cloud-&gt;points[(*indices)[i]].z;</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;  }</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  std::sort (x.begin (), x.end ());</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  std::sort (y.begin (), y.end ());</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;  std::sort (z.begin (), z.end ());</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160; </div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <span class="keywordtype">size_t</span> mid = indices-&gt;size () / 2;</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  <span class="keywordflow">if</span> (indices-&gt;size () % 2 == 0)</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  {</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    median[0] = (x[mid-1] + x[mid]) / 2;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    median[1] = (y[mid-1] + y[mid]) / 2;</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    median[2] = (z[mid-1] + z[mid]) / 2;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  }</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  <span class="keywordflow">else</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;  {</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    median[0] = x[mid];</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    median[1] = y[mid];</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    median[2] = z[mid];</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  }</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;  median[3] = 0;</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a9bb56a33f198ee587d29ad638c8dc6a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9bb56a33f198ee587d29ad638c8dc6a2">&#9670;&nbsp;</a></span>computeMedianAbsoluteDeviation()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">pcl::MaximumLikelihoodSampleConsensus</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::computeMedianAbsoluteDeviation </td>
          <td>(</td>
          <td class="paramtype">const PointCloudConstPtr &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>sigma</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the median absolute deviation: </p>
<p class="formulaDsp">
<img class="formulaDsp" alt="\[ MAD = \sigma * median_i (| Xi - median_j(Xj) |) \]" src="form_74.png"/>
</p>
 <dl class="section note"><dt>注解</dt><dd>Sigma needs to be chosen carefully (a good starting sigma value is 1.4826) </dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the point cloud data message </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">indices</td><td>the set of point indices to use </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">sigma</td><td>the sigma value </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;{</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;  std::vector&lt;double&gt; distances (indices-&gt;size ());</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  Eigen::Vector4f median;</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  <span class="comment">// median (dist (x - median (x)))</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;  <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a8440dc560085d24f3f28e6735dc9a627">computeMedian</a> (cloud, indices, median);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160; </div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; indices-&gt;size (); ++i)</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;  {</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    pcl::Vector4fMapConst pt = cloud-&gt;points[(*indices)[i]].getVector4fMap ();</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    Eigen::Vector4f ptdiff = pt - median;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    ptdiff[3] = 0;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    distances[i] = ptdiff.dot (ptdiff);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;  }</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160; </div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  std::sort (distances.begin (), distances.end ());</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160; </div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  <span class="keywordtype">double</span> result;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;  <span class="keywordtype">size_t</span> mid = indices-&gt;size () / 2;</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  <span class="comment">// Do we have a &quot;middle&quot; point or should we &quot;estimate&quot; one ?</span></div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <span class="keywordflow">if</span> (indices-&gt;size () % 2 == 0)</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    result = (sqrt (distances[mid-1]) + sqrt (distances[mid])) / 2;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;  <span class="keywordflow">else</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    result = sqrt (distances[mid]);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  <span class="keywordflow">return</span> (sigma * result);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_maximum_likelihood_sample_consensus_html_a8440dc560085d24f3f28e6735dc9a627"><div class="ttname"><a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a8440dc560085d24f3f28e6735dc9a627">pcl::MaximumLikelihoodSampleConsensus::computeMedian</a></div><div class="ttdeci">void computeMedian(const PointCloudConstPtr &amp;cloud, const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, Eigen::Vector4f &amp;median)</div><div class="ttdoc">Compute the median value of a 3D point cloud using a given set point indices and return it as a Point...</div><div class="ttdef"><b>Definition:</b> mlesac.hpp:264</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a860128eaca61e128e78f39c7d51972b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a860128eaca61e128e78f39c7d51972b1">&#9670;&nbsp;</a></span>computeModel()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">pcl::MaximumLikelihoodSampleConsensus</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::computeModel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>debug_verbosity_level</em> = <code>0</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the actual model and find the inliers </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">debug_verbosity_level</td><td>enable/disable on-screen debug information and set the verbosity level </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="classpcl_1_1_sample_consensus.html#a6bb9db27c2f0226aaa1e0c2af2b3439e">pcl::SampleConsensus&lt; PointT &gt;</a>.</p>
<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;{</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  <span class="comment">// Warn and exit if no threshold was set</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a> == std::numeric_limits&lt;double&gt;::max())</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;  {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    PCL_ERROR (<span class="stringliteral">&quot;[pcl::MaximumLikelihoodSampleConsensus::computeModel] No threshold set!\n&quot;</span>);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  }</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> = 0;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  <span class="keywordtype">double</span> d_best_penalty = std::numeric_limits&lt;double&gt;::max();</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;  <span class="keywordtype">double</span> k = 1.0;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  std::vector&lt;int&gt; best_model;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  std::vector&lt;int&gt; selection;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  Eigen::VectorXf model_coefficients;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  std::vector&lt;double&gt; distances;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;  <span class="comment">// Compute sigma - remember to set threshold_ correctly !</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a> = <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a9bb56a33f198ee587d29ad638c8dc6a2">computeMedianAbsoluteDeviation</a> (<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getInputCloud (), <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getIndices (), <a class="code" href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">threshold_</a>);</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keywordflow">if</span> (debug_verbosity_level &gt; 1)</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    PCL_DEBUG (<span class="stringliteral">&quot;[pcl::MaximumLikelihoodSampleConsensus::computeModel] Estimated sigma value: %f.\n&quot;</span>, <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="comment">// Compute the bounding box diagonal: V = sqrt (sum (max(pointCloud) - min(pointCloud)^2))</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  Eigen::Vector4f min_pt, max_pt;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#ae91b05dd012acbb76475fc6df5d0ab3b">getMinMax</a> (<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getInputCloud (), <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getIndices (), min_pt, max_pt);</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  max_pt -= min_pt;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="keywordtype">double</span> v = sqrt (max_pt.dot (max_pt));</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keywordtype">int</span> n_inliers_count = 0;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <span class="keywordtype">size_t</span> indices_size;</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  <span class="keywordtype">unsigned</span> skipped_count = 0;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="comment">// supress infinite loops by just allowing 10 x maximum allowed iterations for invalid model parameters!</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> max_skip = <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a> * 10;</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="comment">// Iterate</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keywordflow">while</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> &lt; k &amp;&amp; skipped_count &lt; max_skip)</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  {</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="comment">// Get X samples which satisfy the model criteria</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getSamples (<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a>, selection);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordflow">if</span> (selection.empty ()) <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="comment">// Search for inliers in the point cloud for the current plane model M</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;computeModelCoefficients (selection, model_coefficients))</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      <span class="comment">//iterations_++;</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;      ++ skipped_count;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;      <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    }</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="comment">// Iterate through the 3d points and calculate the distances from them to the model</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getDistancesToModel (model_coefficients, distances);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160; </div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keywordflow">if</span> (distances.empty ())</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;      <span class="comment">//iterations_++;</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;      ++skipped_count;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;      <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    }</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="comment">// Use Expectiation-Maximization to find out the right value for d_cur_penalty</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="comment">// ---[ Initial estimate for the gamma mixing parameter = 1/2</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordtype">double</span> gamma = 0.5;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keywordtype">double</span> p_outlier_prob = 0;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160; </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    indices_size = <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getIndices ()-&gt;size ();</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    std::vector&lt;double&gt; p_inlier_prob (indices_size);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j &lt; <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a7b8670f94aa8cd5345fddfcfba6ec5fd">iterations_EM_</a>; ++j)</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    {</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;      <span class="comment">// Likelihood of a datum given that it is an inlier</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; indices_size; ++i)</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        p_inlier_prob[i] = gamma * exp (- (distances[i] * distances[i] ) / 2 * (<a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a> * <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a>) ) /</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                           (sqrt (2 * M_PI) * <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a>);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;      <span class="comment">// Likelihood of a datum given that it is an outlier</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;      p_outlier_prob = (1 - gamma) / v;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;      gamma = 0;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; indices_size; ++i)</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        gamma += p_inlier_prob [i] / (p_inlier_prob[i] + p_outlier_prob);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;      gamma /= <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span>(<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getIndices ()-&gt;size ());</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    }</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160; </div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="comment">// Find the log likelihood of the model -L = -sum [log (pInlierProb + pOutlierProb)]</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordtype">double</span> d_cur_penalty = 0;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; indices_size; ++i)</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;      d_cur_penalty += log (p_inlier_prob[i] + p_outlier_prob);</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    d_cur_penalty = - d_cur_penalty;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <span class="comment">// Better match ?</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keywordflow">if</span> (d_cur_penalty &lt; d_best_penalty)</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    {</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;      d_best_penalty = d_cur_penalty;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;      <span class="comment">// Save the current model/coefficients selection as being the best so far</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;      <a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a>              = selection;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;      <a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a> = model_coefficients;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160; </div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;      n_inliers_count = 0;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;      <span class="comment">// Need to compute the number of inliers for this model to adapt k</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;      <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; distances.size (); ++i)</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <span class="keywordflow">if</span> (distances[i] &lt;= 2 * <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a>)</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;          n_inliers_count++;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160; </div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;      <span class="comment">// Compute the k parameter (k=log(z)/log(1-w^n))</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;      <span class="keywordtype">double</span> w = <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span> (n_inliers_count) / <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getIndices ()-&gt;size ());</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;      <span class="keywordtype">double</span> p_no_outliers = 1 - pow (w, <span class="keyword">static_cast&lt;</span><span class="keywordtype">double</span><span class="keyword">&gt;</span> (selection.size ()));</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;      p_no_outliers = (std::max) (std::numeric_limits&lt;double&gt;::epsilon (), p_no_outliers);       <span class="comment">// Avoid division by -Inf</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;      p_no_outliers = (std::min) (1 - std::numeric_limits&lt;double&gt;::epsilon (), p_no_outliers);   <span class="comment">// Avoid division by 0.</span></div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;      k = log (1 - <a class="code" href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">probability_</a>) / log (p_no_outliers);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    ++<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a>;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordflow">if</span> (debug_verbosity_level &gt; 1)</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;      PCL_DEBUG (<span class="stringliteral">&quot;[pcl::MaximumLikelihoodSampleConsensus::computeModel] Trial %d out of %d. Best penalty is %f.\n&quot;</span>, <a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a>, <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span> (ceil (k)), d_best_penalty);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">iterations_</a> &gt; <a class="code" href="classpcl_1_1_sample_consensus.html#ab5ca8dbf21b2a1c6ed9c1e8d3eba853c">max_iterations_</a>)</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    {</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;      <span class="keywordflow">if</span> (debug_verbosity_level &gt; 0)</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        PCL_DEBUG (<span class="stringliteral">&quot;[pcl::MaximumLikelihoodSampleConsensus::computeModel] MLESAC reached the maximum number of trials.\n&quot;</span>);</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;      <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;  }</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;  <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a>.empty ())</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;  {</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    <span class="keywordflow">if</span> (debug_verbosity_level &gt; 0)</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;      PCL_DEBUG (<span class="stringliteral">&quot;[pcl::MaximumLikelihoodSampleConsensus::computeModel] Unable to find a solution!\n&quot;</span>);</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;  <span class="comment">// Iterate through the 3d points and calculate the distances from them to the model again</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;  <a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getDistancesToModel (<a class="code" href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">model_coefficients_</a>, distances);</div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;  std::vector&lt;int&gt; &amp;indices = *<a class="code" href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">sac_model_</a>-&gt;getIndices ();</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <span class="keywordflow">if</span> (distances.size () != indices.size ())</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  {</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    PCL_ERROR (<span class="stringliteral">&quot;[pcl::MaximumLikelihoodSampleConsensus::computeModel] Estimated distances (%lu) differs than the normal of indices (%lu).\n&quot;</span>, distances.size (), indices.size ());</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;  }</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;  <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>.resize (distances.size ());</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;  <span class="comment">// Get the inliers for the best model found</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  n_inliers_count = 0;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; distances.size (); ++i)</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="keywordflow">if</span> (distances[i] &lt;= 2 * <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#aa59d111620bf247e8d08d9366eb72beb">sigma_</a>)</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;      <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>[n_inliers_count++] = indices[i];</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160; </div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  <span class="comment">// Resize the inliers vector</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;  <a class="code" href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">inliers_</a>.resize (n_inliers_count);</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160; </div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;  <span class="keywordflow">if</span> (debug_verbosity_level &gt; 0)</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    PCL_DEBUG (<span class="stringliteral">&quot;[pcl::MaximumLikelihoodSampleConsensus::computeModel] Model: %lu size, %d inliers.\n&quot;</span>, <a class="code" href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">model_</a>.size (), n_inliers_count);</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160; </div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1_maximum_likelihood_sample_consensus_html_a9bb56a33f198ee587d29ad638c8dc6a2"><div class="ttname"><a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a9bb56a33f198ee587d29ad638c8dc6a2">pcl::MaximumLikelihoodSampleConsensus::computeMedianAbsoluteDeviation</a></div><div class="ttdeci">double computeMedianAbsoluteDeviation(const PointCloudConstPtr &amp;cloud, const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, double sigma)</div><div class="ttdoc">Compute the median absolute deviation:</div><div class="ttdef"><b>Definition:</b> mlesac.hpp:207</div></div>
<div class="ttc" id="aclasspcl_1_1_maximum_likelihood_sample_consensus_html_ae91b05dd012acbb76475fc6df5d0ab3b"><div class="ttname"><a href="classpcl_1_1_maximum_likelihood_sample_consensus.html#ae91b05dd012acbb76475fc6df5d0ab3b">pcl::MaximumLikelihoodSampleConsensus::getMinMax</a></div><div class="ttdeci">void getMinMax(const PointCloudConstPtr &amp;cloud, const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;indices, Eigen::Vector4f &amp;min_p, Eigen::Vector4f &amp;max_p)</div><div class="ttdoc">Determine the minimum and maximum 3D bounding box coordinates for a given set of points</div><div class="ttdef"><b>Definition:</b> mlesac.hpp:240</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a0115926eadf78f7bc1ad4675659d8343"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a0115926eadf78f7bc1ad4675659d8343">pcl::SampleConsensus&lt; PointT &gt;::inliers_</a></div><div class="ttdeci">std::vector&lt; int &gt; inliers_</div><div class="ttdoc">The indices of the points that were chosen as inliers after the last computeModel () call.</div><div class="ttdef"><b>Definition:</b> sac.h:316</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a025913cc2a2099a553fe7842aa792326"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a025913cc2a2099a553fe7842aa792326">pcl::SampleConsensus&lt; PointT &gt;::probability_</a></div><div class="ttdeci">double probability_</div><div class="ttdoc">Desired probability of choosing at least one sample free from outliers.</div><div class="ttdef"><b>Definition:</b> sac.h:322</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a0e04da16522ae180cb8cc2e6ef0d2244"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a0e04da16522ae180cb8cc2e6ef0d2244">pcl::SampleConsensus&lt; PointT &gt;::model_</a></div><div class="ttdeci">std::vector&lt; int &gt; model_</div><div class="ttdoc">The model found after the last computeModel () as point cloud indices.</div><div class="ttdef"><b>Definition:</b> sac.h:313</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a471e062f42e9cb4ae9d77107cc135acb"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a471e062f42e9cb4ae9d77107cc135acb">pcl::SampleConsensus&lt; PointT &gt;::iterations_</a></div><div class="ttdeci">int iterations_</div><div class="ttdoc">Total number of internal loop iterations that we've done so far.</div><div class="ttdef"><b>Definition:</b> sac.h:325</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_a96f852dfca500689684313d3cb7f84b1"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#a96f852dfca500689684313d3cb7f84b1">pcl::SampleConsensus&lt; PointT &gt;::model_coefficients_</a></div><div class="ttdeci">Eigen::VectorXf model_coefficients_</div><div class="ttdoc">The coefficients of our model computed directly from the model found.</div><div class="ttdef"><b>Definition:</b> sac.h:319</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_aa1c52d7d8be8f058feac1f9241bf305e"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#aa1c52d7d8be8f058feac1f9241bf305e">pcl::SampleConsensus&lt; PointT &gt;::threshold_</a></div><div class="ttdeci">double threshold_</div><div class="ttdoc">Distance to model threshold.</div><div class="ttdef"><b>Definition:</b> sac.h:328</div></div>
<div class="ttc" id="aclasspcl_1_1_sample_consensus_html_aa4953d080c1ab4223cde8ff8d8cabc52"><div class="ttname"><a href="classpcl_1_1_sample_consensus.html#aa4953d080c1ab4223cde8ff8d8cabc52">pcl::SampleConsensus&lt; PointT &gt;::sac_model_</a></div><div class="ttdeci">SampleConsensusModelPtr sac_model_</div><div class="ttdoc">The underlying data model used (i.e. what is it that we attempt to search for).</div><div class="ttdef"><b>Definition:</b> sac.h:310</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ae91b05dd012acbb76475fc6df5d0ab3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae91b05dd012acbb76475fc6df5d0ab3b">&#9670;&nbsp;</a></span>getMinMax()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">pcl::MaximumLikelihoodSampleConsensus</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::getMinMax </td>
          <td>(</td>
          <td class="paramtype">const PointCloudConstPtr &amp;&#160;</td>
          <td class="paramname"><em>cloud</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const boost::shared_ptr&lt; std::vector&lt; int &gt; &gt; &amp;&#160;</td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Eigen::Vector4f &amp;&#160;</td>
          <td class="paramname"><em>min_p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Eigen::Vector4f &amp;&#160;</td>
          <td class="paramname"><em>max_p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determine the minimum and maximum 3D bounding box coordinates for a given set of points </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">cloud</td><td>the point cloud message </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">indices</td><td>the set of point indices to use </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">min_p</td><td>the resultant minimum bounding box coordinates </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">max_p</td><td>the resultant maximum bounding box coordinates </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;{</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;  min_p.setConstant (FLT_MAX);</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  max_p.setConstant (-FLT_MAX);</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;  min_p[3] = max_p[3] = 0;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160; </div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i &lt; indices-&gt;size (); ++i)</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;  {</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    <span class="keywordflow">if</span> (cloud-&gt;points[(*indices)[i]].x &lt; min_p[0]) min_p[0] = cloud-&gt;points[(*indices)[i]].x;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    <span class="keywordflow">if</span> (cloud-&gt;points[(*indices)[i]].y &lt; min_p[1]) min_p[1] = cloud-&gt;points[(*indices)[i]].y;</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    <span class="keywordflow">if</span> (cloud-&gt;points[(*indices)[i]].z &lt; min_p[2]) min_p[2] = cloud-&gt;points[(*indices)[i]].z;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160; </div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordflow">if</span> (cloud-&gt;points[(*indices)[i]].x &gt; max_p[0]) max_p[0] = cloud-&gt;points[(*indices)[i]].x;</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    <span class="keywordflow">if</span> (cloud-&gt;points[(*indices)[i]].y &gt; max_p[1]) max_p[1] = cloud-&gt;points[(*indices)[i]].y;</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    <span class="keywordflow">if</span> (cloud-&gt;points[(*indices)[i]].z &gt; max_p[2]) max_p[2] = cloud-&gt;points[(*indices)[i]].z;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;  }</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a34ea1f0393f8487a30213a1b8ad76322"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34ea1f0393f8487a30213a1b8ad76322">&#9670;&nbsp;</a></span>setEMIterations()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">pcl::MaximumLikelihoodSampleConsensus</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::setEMIterations </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>iterations</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the number of EM iterations. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">iterations</td><td>the number of EM iterations </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;{ <a class="code" href="classpcl_1_1_maximum_likelihood_sample_consensus.html#a7b8670f94aa8cd5345fddfcfba6ec5fd">iterations_EM_</a> = iterations; }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>sample_consensus/include/pcl/sample_consensus/<a class="el" href="mlesac_8h_source.html">mlesac.h</a></li>
<li>sample_consensus/include/pcl/sample_consensus/impl/<a class="el" href="mlesac_8hpp_source.html">mlesac.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><a class="el" href="classpcl_1_1_maximum_likelihood_sample_consensus.html">MaximumLikelihoodSampleConsensus</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
